package com.ruoyi.recycle.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.recycle.domain.HousekeepingCommodity;
import com.ruoyi.recycle.mapper.HousekeepingCommodityMapper;
import com.ruoyi.recycle.service.IHousekeepingCommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 家政服务列Service业务层处理
 *
 * @author ruoyi
 * @date 2022-05-22
 */
@Service
public class HousekeepingCommodityServiceImpl extends ServiceImpl<HousekeepingCommodityMapper, HousekeepingCommodity> implements IHousekeepingCommodityService {
    @Autowired
    private HousekeepingCommodityMapper housekeepingCommodityMapper;

    /**
     * 查询家政服务列
     *
     * @param id 家政服务列主键
     * @return 家政服务列
     */
    @Override
    public HousekeepingCommodity selectHousekeepingCommodityById(Long id) {
        return housekeepingCommodityMapper.selectHousekeepingCommodityById(id);
    }

    /**
     * 查询家政服务列列表
     *
     * @param housekeepingCommodity 家政服务列
     * @return 家政服务列
     */
    @Override
    public List<HousekeepingCommodity> selectHousekeepingCommodityList(HousekeepingCommodity housekeepingCommodity) {
        return housekeepingCommodityMapper.selectHousekeepingCommodityList(housekeepingCommodity);
    }

    /**
     * 新增家政服务列
     *
     * @param housekeepingCommodity 家政服务列
     * @return 结果
     */
    @Override
    public int insertHousekeepingCommodity(HousekeepingCommodity housekeepingCommodity) {
        return housekeepingCommodityMapper.insertHousekeepingCommodity(housekeepingCommodity);
    }

    /**
     * 修改家政服务列
     *
     * @param housekeepingCommodity 家政服务列
     * @return 结果
     */
    @Override
    public int updateHousekeepingCommodity(HousekeepingCommodity housekeepingCommodity) {
        return housekeepingCommodityMapper.updateHousekeepingCommodity(housekeepingCommodity);
    }

    /**
     * 批量删除家政服务列
     *
     * @param ids 需要删除的家政服务列主键
     * @return 结果
     */
    @Override
    public int deleteHousekeepingCommodityByIds(Long[] ids) {
        return housekeepingCommodityMapper.deleteHousekeepingCommodityByIds(ids);
    }

    /**
     * 删除家政服务列信息
     *
     * @param id 家政服务列主键
     * @return 结果
     */
    @Override
    public int deleteHousekeepingCommodityById(Long id) {
        return housekeepingCommodityMapper.deleteHousekeepingCommodityById(id);
    }
}
